﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
using Film.Repository;


namespace PhuongDoAn.Admin.Occupation
{
    public partial class Default : AdminWebBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        [DirectMethod]
        public void Delete(int ID)
        {
            try
            {
                tblOccupationRepository ageRepository = new tblOccupationRepository();
               // tblOccupation entity = ageRepository.GetByOccID(ID);
               // ageRepository.DeleteOnSubmit(entity);
                ageRepository.Delete(ID);
                ageRepository.SubmitChanges();
                THONG_BAO_CAP_NHAT("Xóa nghề nghiệp thành công");
            }
            catch (Exception ex)
            {
                THONG_BAO_CAP_NHAT("Lỗi khi xóa danh mục nghề nghiệp");
            }
        }
    }
}